//
//  DetailViewController.m
//  B段项目
//
//  Created by 昶博 on 15/9/23.
//  Copyright (c) 2015年 昶博. All rights reserved.
//

#import "DetailViewController.h"
#import "AFNetworking.h"
#import <UIImageView+WebCache.h>
#import "Player.h"
@interface DetailViewController ()

@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
     self.dic = [NSDictionary dictionary];
  
    [self viewSubView];
 
   
    
}

-(void)viewSubView
{
    
    
  
     self.picImag = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
 
    [self.picImag sd_setImageWithURL:[NSURL URLWithString:[Player share].BigPic] placeholderImage:[UIImage imageNamed:@"44"]];

    [self.view addSubview:self.picImag];
    
    UIVisualEffectView *visual = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
    visual.frame = [[UIScreen mainScreen] bounds];
    visual.alpha = 0.7;
    [self.view addSubview:visual];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(20, 30, 30, 30);
    [button setBackgroundImage:[UIImage imageNamed:@"下拉"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(clicked) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:button];
    
    UIButton *BoButton = [UIButton buttonWithType:UIButtonTypeCustom];
    BoButton.frame = CGRectMake(self.view.frame.size.width/2-30, self.view.frame.size.height-100, 50, 50);
    [BoButton setBackgroundImage:[UIImage imageNamed:@"1993"] forState:UIControlStateNormal];
    [BoButton addTarget:self action:@selector(BoButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:BoButton];
    
    UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeSystem];
    leftButton.frame = CGRectMake(80, self.view.frame.size.height-92, 40, 40);
    [leftButton setBackgroundImage:[UIImage imageNamed:@"left"] forState:UIControlStateNormal];
    [leftButton addTarget:self action:@selector(leftButtonClicked) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:leftButton];
    
    UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeSystem];
   rightButton.frame = CGRectMake(240, self.view.frame.size.height-92, 40, 40);
    [rightButton setBackgroundImage:[UIImage imageNamed:@"right"] forState:UIControlStateNormal];
    [rightButton addTarget:self action:@selector(rightButtonClicked) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:rightButton];
    
    self.PicImageView =[[UIImageView alloc]initWithFrame:CGRectMake(75, 150, 230, 230)];
    self.PicImageView.backgroundColor = [UIColor greenColor];
    self.PicImageView.layer.masksToBounds = YES;
    self.PicImageView.layer.cornerRadius = 115;
    [self.PicImageView sd_setImageWithURL:[NSURL URLWithString:[Player share].Pic] placeholderImage:[UIImage imageNamed:@"44"]];
 
    [self.view addSubview:self.PicImageView];
    
    self.longLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 450, 250, 20)];
   
    self.longLabel.text = self.model.program_live_time;
    [self.view addSubview:self.longLabel];
    self.longnextLabel = [[UILabel alloc]initWithFrame:CGRectMake(150, 450, 275, 20)];
   
    self.longnextLabel.text = self.model.program_title;
    [self.view addSubview:self.longnextLabel];
   
       self.slider = [[UISlider alloc]initWithFrame:CGRectMake(75, 520, 220, 20)];
    [self.slider setThumbImage:[UIImage imageNamed:@"进度条按钮"] forState:UIControlStateNormal];
    [self.view addSubview:self.slider];

    self.leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 520, 50, 20)];
    self.leftLabel.backgroundColor = [UIColor greenColor];
    [self.view addSubview:self.leftLabel];
    self.rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(310, 520, 50, 20)];
    self.rightLabel.backgroundColor = [UIColor greenColor];
    [self.view addSubview:self.rightLabel];
    
  
}

-(void)rightButtonClicked
{
    
    
    
}
-(void)leftButtonClicked
{
    
    
    
}
-(void)BoButtonClicked:(UIButton *)button;
{
  
    button.selected = !button.selected;
    if (button.selected == 1) {
        
        [button setBackgroundImage:[UIImage imageNamed:@"1992"] forState:UIControlStateNormal];
        
        
        
        
    }
    else
    {
        
    [button setBackgroundImage:[UIImage imageNamed:@"1993"] forState:UIControlStateNormal];
        
    }
    
}
-(void)clicked
{
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
